#region head comment
/*
Code generate by YhdSdkTool.
email:starpeng@vip.qq.com
2013-01-21 23:00:57:362 +08:00
*/
#endregion

using System;
using System.Xml.Serialization;
using System.Collections.Generic;
using YhdSdk.Domain;
using YhdSdk.Domain.Logistics;
using YhdSdk.Response.Logistics;

namespace YhdSdk.Request.Logistics
{
    /// <summary>
    /// 订单发货（更新订单物流信息）
    ///<para></para>
    ///<para>根据订单号(订单编码)，配送商id,运单号(快递编号)进行相应的订单发货处理。订单发货成功，</para>
    ///<para>则返回更新成功记录数，订单发货失败，则返回更新失败记录数及相应的错误描述信息(只有待发货状态ORDER_TRUNED_TO_DO的订单才可以进行发货操作)</para>
    /// </summary>
    public class YhdLogisticsOrderShipmentsUpdateRequest : IYhdRequest<YhdLogisticsOrderShipmentsUpdateResponse>
    {
        /// <summary>
        /// 订单号(订单编码)
        /// </summary>
        /// <example>11111080EB4D</example>
        [XmlElement("orderCode")]
        public String OrderCode
        {
            get;
            set;
        }

        /// <summary>
        /// 配送商ID(从获取物流信息接口中获取)
        /// </summary>
        /// <example>1759</example>
        [XmlElement("deliverySupplierId")]
        public Int64 DeliverySupplierId
        {
            get;
            set;
        }

        /// <summary>
        /// 运单号(快递编号)
        /// </summary>
        /// <example>H4578DFSA78</example>
        [XmlElement("expressNbr")]
        public String ExpressNbr
        {
            get;
            set;
        }

        /// <summary>
        /// Api接口名称
        /// </summary>
        public String ApiName
        {
            get{ return "yhd.logistics.order.shipments.update"; }
        }

        /// <summary>
        /// 获取参数列表
        /// </summary>
        public IDictionary<string, string> GetParameters()
        {
            YhdDictionary parameters = new YhdDictionary();
            parameters.Add("orderCode" ,this.OrderCode);
            parameters.Add("deliverySupplierId" ,this.DeliverySupplierId);
            parameters.Add("expressNbr" ,this.ExpressNbr);
            return parameters;
        }

        /// <summary>
        /// 验证参数
        /// </summary>
        public void Validate()
        {
            RequestValidator.ValidateRequired("orderCode", this.OrderCode);
            RequestValidator.ValidateRequired("deliverySupplierId", this.DeliverySupplierId);
            RequestValidator.ValidateRequired("expressNbr", this.ExpressNbr);
        }

    }
}
